package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 石方旭
 * Date: 2022-07-27
 * Time: 11:09
 */
public class test7 {


    public static void main(String[] args) {
        Thread t = new Thread (()->{
            //System.out.println("我是Thread!!!");
        },"我是使用lambda表达式创建的Thread线程");
        System.out.println("创建前的状态:"+t.getState());
        t.start();
        System.out.println("线程名字 : "+t.getName());
        System.out.println("线程身份Id : "+t.getId());
        System.out.println("当前线程状态 : "+t.getState());
        System.out.println("线程是否存活 : "+t.isAlive());
        System.out.println("线程是否为守护线程 : "+t.isDaemon());
        System.out.println("线程是否中断 : "+t.isInterrupted());
        System.out.println("线程的优先级 : "+t.getPriority());
    }

}
